package com.pussinboots.morning.sync.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.Accessors;
import lombok.experimental.Tolerate;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author TS
 * @since 2019-09-22
 */
@Data
//支持链式风格
@Accessors(chain = true)
@Builder
@TableName("MORNING_ORDER_WRITEBACK")
public class ErpMorningOrderWriteback extends Model<ErpMorningOrderWriteback> {

    private static final long serialVersionUID = 1L;

    /**
     * 解决@Data与@Builder一起使用，实体类没有无参构造函数的坑
     * 此注解让lombok假装不知道有此方法，这样就不会与@Data产生冲突
     */
    @Tolerate
    public ErpMorningOrderWriteback(){}

    @TableId("ORDER_NUMBER")
    private Long orderNumber;

    @TableField("STATUS")
    private Integer status;

    @TableField("IS_ZX")
    private Integer isZx;

    @Override
    protected Serializable pkVal() {
        return this.orderNumber;
    }
}